<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
  <%@include file="../include/head.jsp"%>
  <%@include file="../include/link.jsp" %>
  <link rel="stylesheet" type="text/css" href="../../../static/wxApp/css/index.css">
</head>
<script>
  //处理图片的宽高
  function setImgWH(obj) {
    if (obj.width > obj.height) {
      $(obj).css('height', '100%');
    } else {
      $(obj).css('width', '100%');
    }
  }
</script>
<body>
<%@include file="../include/appHerder.jsp" %>
<div class="container">
  <div class="content">
    <div class="filter">
      <div class="box1">
        <span><a href="${ctx}">首页</a></span>
        <span>></span>
        <span><a href="${ctx}/home">小程序商店</a></span>
      </div>
      <%@include file="../include/categoryMenu.jsp" %>
    </div>
    <form action="${ctx}/wxApp" id="searchForm" method="get">
        <%--<input type="text" id="pageNum" name="pageNum" value="${pageParam.pageNum}">--%>
        <%--<input type="text" id="pageSize" name="pageSize" value="${pageParam.pageSize}">--%>
    </form>
    <div class="companyBigBox clearfix">
      <c:forEach var="item" items="${pageInfo.getList()}">
        <a href="/app/${item.id}.html" target="_blank">
          <div class="companyBox">
            <div class="top clearfix">
              <div class="left"><img onload="setImgWH(this)" class="lazy b-loaded"  data-original="<c:if test="${item.sourceId==2}">https://media.ifanrusercontent.com</c:if><c:if test="${item.sourceId==1}">//img.cmcmcdn.com</c:if><c:if test="${item.sourceId==3}">${imgServer}</c:if>${item.logoUrl}"
                                     title="${item.appName}"    alt="${item.appName}小程序"></div>
              <div class="right">
                <div class="box1 clearfix">
                  <span class="span1">${item.appName}</span>
                  <span class="span2">体验</span>
                </div>
                <div class="box2 clearfix">
                  <span class="span1"><img data-original="../../../static/wxApp/img/xing.png" alt="${item.appName}小程序"></span>
                  <span class="span2">${item.hot}</span>
                </div>
                <div class="box3">
                  <p title="${item.appSum}">${item.appSum}</p>
                </div>
              </div>
            </div>
            <div class="bottom clearfix">
              <div class="left">
                <c:forEach var="tag" items="${item.tagsArr}">
                  <span>${tag}</span>
                </c:forEach>
              </div>
              <div class="right">
                9999+
              </div>
            </div>
          </div>
        </a>
      </c:forEach>
    </div>
    <div class="page">
      ${pageInfo.toString().replaceAll("urlTemp","/wxApp/")}
    </div>
  </div>
</div>
<%@include file="../include/footer.jsp" %>
</body>
<script type="text/javascript" data-original="../../../static/common/js/pageSearch.js"></script>
<script>
  $(function () {
    // 点击标签的效果
    $("#tags a").click(function () {
      $("#tags a").removeClass("on")
      $(this).addClass("on")
    })
  })
</script>
</html>
